<script setup>
//    import HelloWorld from './components/HelloWorld.vue'
    import {provide,ref } from 'vue'
    let  server_addr = window.localStorage.getItem('server_addr')
    if(server_addr == null){
        window.localStorage.setItem('server_addr','rqd-thinkpad-t450')
        server_addr = 'rqd-thinkpad-t450'
    }
    const server = ref(server_addr)
    provide('serve_addr',server)
</script>

<template>
    <div id="nav">
        <router-link to="/">主界面</router-link> |
        <router-link to="/test1">控制台</router-link> |
        <router-link to="/about2/hello">ROV配置</router-link> 
    </div>

    <router-view v-slot="{Component}">
        <transition>
            <keep-alive>
                <component :is="Component"/>
            </keep-alive>
        </transition>
    </router-view>
 <!--- <HelloWorld msg="Vite + Vue" />     -->
</template>

<style scoped>
.logo {
    height: 6em;
    padding: 1.5em;
    will-change: filter;
    transition: filter 300ms;
}
.logo:hover {
    filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.vue:hover {
    filter: drop-shadow(0 0 2em #42b883aa);
}
</style>
